"""Car URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,include
from maintenance import views as mviews
from user import views as uviews
from app01 import views as aviews
from routing import views as rviews
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

'''
1. maintence/mviews.py  #维修保养
2. goods                #购物商城
3. user/uviews.py       #登录/注册
4. app01/aviews         #社交圈
5. chatbot/             #在线帮助（智能客服）
6. routing/rviews       #充电规划

'''

urlpatterns = [
    path('admin/', admin.site.urls),

    # 购物商城
    path('purchase/',include('goods.urls')),

    # 维修保养
    path('repair/', mviews.repair),
    path('repair/add/',mviews.repair_add),
    path('repair/list/',mviews.repair_list),
    path('repair/delete/',mviews.repair_delete),
    path('repair/detail/',mviews.repair_detail),
    path('repair/edit/',mviews.repair_edit),
    path('repair/detail1/',mviews.repair_detail1),
    path('repair/detail2/',mviews.repair_detail2),

    # 登录/注册
    path('index/',uviews.index),
    path('signin/', uviews.signin),
    path('signup/', uviews.signup),
    path('signout/', uviews.signout),

    #社交圈
    path('moment/', aviews.moment),
    path('detail/<int:tid>/', aviews.detail), #动态详情

    path('mymmt/', aviews.mymmt), #我的动态
    path('myfollow/', aviews.myfollow),
    path('myfans/', aviews.myfans),
    path("digg/",aviews.digg),
    path('infomation/', aviews.infomation),

    # 在线服务
    path('chatbot/', include('chatbot.urls')),

    # 充电规划
    path('view_power/', rviews.view_power),
    path('view_power/power_map/', rviews.power_map),
    path('view_power/AD_power_map/', rviews.AD_power_map),
    path('view_power/EP_power_map/', rviews.EP_power_map),
    path('add_power/', rviews.add_power),
    path('add_power/<int:point_number>', rviews.update_power),
    path('add_power/update_power/<int:point_number>', rviews.update_power),
    path('add_power/update_power/update_power/<int:point_number>', rviews.update_power),
    path('delete_power/<int:point_number>', rviews.delete_power),
    path('view_power/pro', rviews.pro),
    path('view_power/city<int:id>/', rviews.city),
    path('view_power/choose_power', rviews.choose_power),

]
urlpatterns += staticfiles_urlpatterns()
